import type * as Product from "./type"
import { request } from "@/http/axios"

/** 获取登录验证码 */
export function getProductById(params: Product.ProductRequestData) {
  return request<Product.ProductResponseData>({
    url: "su/product/get",
    params,
    method: "get"
  })
}

export function getProductSkuById(params: Product.ProductSkuRequestData) {
  return request<Product.ProductSkuResponseData>({
    url: "su/product-sku/list",
    params,
    method: "get"
  })
}

export function getShipFee() {
  return request<Product.ShipFeeResponseData>({
    url: "su/ship-fee/list",
    method: "get"
  })
}

export function getWeight(params: Product.ProductSkuRequestData) {
  return request<Product.ProductWeightResponseData>({
    url: "su/product-weight/list",
    params,
    method: "get"
  })
}
